package cn.jorian.framework.net;

import cn.jorian.framework.bean.ResponseResult;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.Map;

/**
 * 项目名称：
 * 文件名称：ServiceApi
 * 文件描述：接口
 * 创建作者：胡涛
 * 创建日期：2020/9/18
 * 文件版本：1.0
 */
public interface ServiceApi {

    /**
     * 测试IP
     */
    //idea 环境
//    String IP = "http://172.16.1.73:8080/Cdfy-mawms-service/";
    String IP = "http://10.0.0.129:8002";
//    String IP = "http://192.168.31.55:8080";

    //tomcat 环境
//    String IP = "http://10.0.0.129:8080/mybatis-module-1.0.0/";


    String gooods = "test/goods";
    @POST(gooods)
    @FormUrlEncoded
    Call<ResponseResult> goods(@FieldMap Map<String, Object> map);

    String indocBack = "ma/maBack";
    @POST(indocBack)
    @FormUrlEncoded
    Call<ResponseResult> indocBack(@FieldMap Map<String, Object> map);


    String uploadFile = "/uploadFile";
    @POST(uploadFile)
    @Multipart
    Call<ResponseResult> uploadFile(@PartMap Map<String, RequestBody> map);
}
